//
//  TabItem.h
//  BaiduTravel
//
//  Created by guantianpeng on 13-5-10.
//  Copyright (c) 2013年 Baidu.com. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TabItem;

@protocol TabItemDelegate <NSObject>

- (void)didSelectTabItem:(TabItem *)itemView;

@optional
- (void)didUnselectTabItem:(TabItem *)itemView;

@end

@interface TabItem : UIView{
    UIImage *_imgNormalBg;
    UIImage *_imgSelectedBg;
    UIImage *_imgNormalArrow;
    UIImage *_imgSelectedArrow;
    UIImage *_imgItemBottomArrow;
}

@property(nonatomic, retain) UIImage *imgSelectedBg;
@property(nonatomic, retain) UIImage *imgNormalBg;
@property(nonatomic, retain) UIImage *imgSelectedArrow;
@property(nonatomic, retain) UIImage *imgNormalArrow;
@property(nonatomic, retain) UIImage *imgItemBottomArrow;
@property(nonatomic, copy) NSString *title;
@property(nonatomic, assign) id<TabItemDelegate> tabItemDelegate;
@property(nonatomic, assign) BOOL itemSelected;

-(void) setItemSelectedBackground;
-(void) resetItemNormalBackground;
- (void) layoutSubviewsWithArrowWidth:(CGFloat)width andHeight:(CGFloat)height iconInRight:(BOOL)inRight;


@end


